get count of relationship table laravel

36

get count of relationship table laravel -

Category::where('parent_id', 0)->withCount('articles')->get();

Comments

Submit
0 Comments